from django.contrib import admin
from .models import Banner, Nav

# Register your models here.
@admin.register(Banner)
class BannerInfoAdmin(admin.ModelAdmin):
    list_display = ['title', 'link', 'image_url', 'orders', 'is_show', 'is_delete']
    list_filter = ['is_show']
    search_fields = ['title', 'link']
    
@admin.register(Nav)
class NavAdmin(admin.ModelAdmin):
    list_display = ['title', 'position', 'is_show', 'is_site', 'link']
    search_fields = ['title']  # 搜索字段
    list_filter = ['is_show']  # 过滤字段